home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / util / AbstractMap$SimpleEntry.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.6 KB  |  51 lines

  1. package java.util;
  2.  
  3. import java.io.Serializable;
  4.  
  5. public class AbstractMap$SimpleEntry<K, V> implements Map.Entry<K, V>, Serializable {
  6.    private static final long serialVersionUID = -8499721149061103585L;
  7.    private final K key;
  8.    private V value;
  9.  
  10.    public AbstractMap$SimpleEntry(K var1, V var2) {
  11.       this.key = var1;
  12.       this.value = var2;
  13.    }
  14.  
  15.    public AbstractMap$SimpleEntry(Map.Entry<? extends K, ? extends V> var1) {
  16.       this.key = (K)var1.getKey();
  17.       this.value = (V)var1.getValue();
  18.    }
  19.  
  20.    public K getKey() {
  21.       return this.key;
  22.    }
  23.  
  24.    public V getValue() {
  25.       return this.value;
  26.    }
  27.  
  28.    public V setValue(V var1) {
  29.       Object var2 = this.value;
  30.       this.value = var1;
  31.       return (V)var2;
  32.    }
  33.  
  34.    public boolean equals(Object var1) {
  35.       if (!(var1 instanceof Map.Entry)) {
  36.          return false;
  37.       } else {
  38.          Map.Entry var2 = (Map.Entry)var1;
  39.          return AbstractMap.access$000(this.key, var2.getKey()) && AbstractMap.access$000(this.value, var2.getValue());
  40.       }
  41.    }
  42.  
  43.    public int hashCode() {
  44.       return (this.key == null ? 0 : this.key.hashCode()) ^ (this.value == null ? 0 : this.value.hashCode());
  45.    }
  46.  
  47.    public String toString() {
  48.       return this.key + "=" + this.value;
  49.    }
  50. }
  51.